﻿<%@ Page Title="ScrumPeak.com" Language="C#" MasterPageFile="~/Views/Shared/Site.Master"
  AutoEventWireup="true" Inherits="MvcContrib.FluentHtml.ModelViewPage<TaskModel>" %>

<%@ Import Namespace="Peak.ApplicationServices" %>
<%@ Import Namespace="Peak.Web.Controllers" %>
<%@ Import Namespace="Peak.Web.Controllers.HtmlExtentions" %>
<%@ Import Namespace="Peak.Resources" %>
<%@ Import Namespace="Peak.Web.Controllers.Models" %>
<%@ Import Namespace="Peak.Web" %>
<%@ Import Namespace="Peak.Core" %>
<asp:Content ContentPlaceHolderID="center" runat="server">
  <div class="page-content">
    <div class="page-title">
      <%= PageTitles.TaskDetails %>
    </div>
    <form method="post">
    <table class="form">
      <tbody>
        <tr>
          <td class="formLabel" align="right">
            <%= Labels.Name %>
          </td>
          <td class="formData">
            <%= Model.Name %>
          </td>
        </tr> 
        <tr>
          <td class="formLabel" align="right">
            <%= Labels.Category %>
          </td>
          <td class="formData">
            <%= Model.Category %>
          </td>
        </tr>
        <tr>
          <td class="formLabel" align="right">
            <%= Labels.Description %>
          </td>
          <td class="formData">
            <%= Model.Description %>
          </td>
        </tr>          
        <tr>
          <td class="formLabel" align="right">
            <%= Labels.RemainingEffort %>
          </td>
          <td class="formData">
            <%= DurationParser.ToString(Model.RemainingEffort) %>
          </td>
        </tr>
        <tr>
          <td class="formLabel" align="right">
            <%= Labels.AssignedTo %>
          </td>
          <td class="formData">
            <%= Model.AssignedTo %>            
          </td>
        </tr>
        <tr>
          <td class="formLabel" align="right">
            <%= Labels.Status %>
          </td>
          <td class="formData">
            <%= Statuses.ResourceManager.GetString(Model.Status.ToString()) %>
          </td>
        </tr>
        <tr>
          <td class="formLabel" align="right">
            <%= Labels.Created %>
          </td>
          <td class="formData">
            <%= Model.Created %>
          </td>
        </tr>
        <tr>
          <td class="formLabel" align="right">
            <%= Labels.Start %>
          </td>
          <td class="formData">
            <%= Model.StartDate %>
          </td>
        </tr>
        <tr>
          <td class="formLabel" align="right">
            <%= Labels.End %>
          </td>
          <td class="formData">
            <%= Model.EndDate %>
          </td>
        </tr>
        <tr>
          <td>
          </td>
          <td>
            <%= Html.PeakButton<TaskController>(f=>f.Edit(Model.TaskId),Buttons.Edit)%>
            <%= Html.PeakButton<BaseController>(f => f.Back(), Buttons.Back)%>
            <%= Html.PeakButton<StoryController>(f => f.Index(Model.SprintStoryId,null), Buttons.GotoStory)%>
            <%= Html.PeakButton<TaskController>(f => f.AssignToMe(Model.TaskId), Buttons.AssignToMe)%>
          </td>
        </tr>
      </tbody>
    </table>
    </form>
  </div>
</asp:Content>
